import random 

a = (-7, 8)
b = (5, -8)
c = (5, 5)
d = (-7, 5)

n = int(input("Введите количество выстрелов: "))

hits = 0

for _ in range(n):
    x = random.randint(-100, 100)
    y = random.randint(-100, 100)

    if (x == a[0] and y >= a[1] and y <= c[1]) or (x == c[0] and y >= b[1] and y <= c[1]) or (y == a[1] and x >= a[0] and x <= c[0]) or (y == c[1] and x >= d[0] and x <= b[0]):
        hits += 1

if hits == 0:
    print("непопал ни разу")
else:
    print("Количество успешных попаданий:", hits)

